﻿using ET.Monitor.DAL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ET.Monitor.Model
{
    public class FinanceModel
    {
        FinanceDAL dal = new FinanceDAL();

        string id, typeId, dateTime,fileName;
        float paymentAmount;
        byte[] bt;
        public FinanceModel()
        {
        }

        public FinanceModel(string id)
        {
            this.id = id;
        }
        public FinanceModel(string orgId, string typeId, float paymentAmount, string time,byte[] b,string fileName)
        {
            this.id = orgId;
            this.typeId = typeId;
            this.paymentAmount = paymentAmount;
            this.dateTime = time;
            this.bt = b;
            this.fileName = fileName;
        }

        #region 运维实际费用支出
        bool addOMCost;

        public bool AddOMCost
        {
            get { return dal.AddOMCost(id, typeId, paymentAmount, dateTime,bt,fileName); }
            set { addOMCost = value; }
        }

        bool updateOMCost;

        public bool UpdateOMCost
        {
            get { return dal.UpdateOMCost(id,typeId,paymentAmount,dateTime,bt,fileName); }
            set { updateOMCost = value; }
        }

        bool deleteOMCost;

        public bool DeleteOMCost
        {
            get { return dal.DeleteOMCost(id) ; }
            set { deleteOMCost = value; }
        }

        DataTable dtOMCostType;

        public DataTable DtOMCostType
        {
            get { return dal.GetOMCostType(); }
            set { dtOMCostType = value; }
        }
        #endregion
    }
}
